package net.xiduth.events.button;

import net.xiduth.events.ButtonEvent;
import net.xiduth.events.EventManager;
import net.xiduth.game.player.Player;

/**
 * @author Tyluur <ItsTyluur@Gmail.com>
 * @since 2012-07-29
 */
public class WelcomeInterface implements ButtonEvent {

	@Override
	public boolean init() {
		return EventManager.register(1066, this);
	}

	@Override
	public boolean handle(Player player, int interfaceId, int buttonId,
			int packetId, int slotId, int slotId2) {
		switch(buttonId) {
		case 28:
			player.getPackets().sendOpenURL("http://www.google.com/");
			return true;
		case 35:
			player.getPackets().sendOpenURL("https://www.google.com/");
			return true;
		}
		return false;
	}

}
